/* 全局样式重置和Element Plus样式补充 */

/* 重置默认样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
    'Helvetica Neue', sans-serif;
  background-color: #f9fafb;
  color: #1f2329;
}

#app {
  height: 100%;
}

/* Element Plus 组件样式补充 */
.el-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.el-main {
  background-color: #f9fafb;
  padding: 20px;
}

.el-card {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.el-card__header {
  background-color: #fafafa;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 20px;
}

.el-button {
  border-radius: 6px;
  font-weight: 500;
}

.el-button--primary {
  background-color: #409eff;
  border-color: #409eff;
}

.el-button--success {
  background-color: #67c23a;
  border-color: #67c23a;
}

.el-button--warning {
  background-color: #e6a23c;
  border-color: #e6a23c;
}

.el-button--danger {
  background-color: #f56c6c;
  border-color: #f56c6c;
}

.el-button--text {
  color: #409eff;
  border: none;
  background: transparent;
}

.el-button--text:hover {
  background-color: rgba(64, 158, 255, 0.1);
}

.el-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.el-input {
  border-radius: 6px;
}

input {
  background-color: #ffffff !important;
}

.el-input__inner {
  border-radius: 6px;
}

.el-input-number {
  border-radius: 6px;
}

.el-input-number .el-input__inner {
  border-radius: 6px;
}

.el-select {
  border-radius: 6px;
}

.el-select .el-input__inner {
  border-radius: 6px;
}

.el-form {
  width: 100%;
}

.el-form-item {
  margin-bottom: 20px;
}

.el-form-item__label {
  font-weight: 500;
  color: #374151;
}

.el-table {
  border-radius: 8px;
  overflow: hidden;
}

.el-table th {
  background-color: #fafafa;
  color: #374151;
  font-weight: 600;
}

.el-table td {
  border-bottom: 1px solid #f3f4f6;
}

.el-tag {
  border-radius: 6px;
  font-weight: 500;
}

.el-tag--success {
  background-color: #d1fae5;
  border-color: #10b981;
  color: #065f46;
}

.el-tag--warning {
  background-color: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.el-tag--danger {
  background-color: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

.el-tag--info {
  background-color: #e0e7ff;
  border-color: #6366f1;
  color: #3730a3;
}

.el-progress {
  margin: 16px 0;
}

.el-pagination {
  text-align: right;
  margin-top: 20px;
}

.el-upload {
  width: 100%;
}

.el-upload-dragger {
  border-radius: 8px;
  border: 2px dashed #d1d5db;
  background-color: #ffffff;
  transition: all 0.3s ease;
}

.el-upload-dragger:hover {
  border-color: #409eff;
  background-color: rgba(64, 158, 255, 0.05);
}

.el-upload-dragger.is-dragover {
  border-color: #409eff;
  background-color: rgba(64, 158, 255, 0.1);
}

.el-icon {
  vertical-align: middle;
}

/* 图标样式 */
.el-icon svg {
  width: 1em;
  height: 1em;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .el-main {
    padding: 16px;
  }

  .el-card {
    margin-bottom: 16px;
  }

  .el-card__header {
    padding: 12px 16px;
  }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 加载状态 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f9fafb;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
